# The American Viewer: Political Consequences of Entertainment Media
# Eunji Kim and Shawn Patterson Jr 
# American Political Science Review 
# Replication File [Appendix F Open-Ended Answers and Content Analysis (intercoder reliability)]


library(tidyverse)
library(irr)


trump_open <- read.csv("appendix_f_openended.csv")


list1 <- trump_open$openended[trump_open$apprentice == 1]
cat(paste(list1, collapse = "\n"))

list2 <- trump_open$openended[trump_open$apprentice == 5]
cat(paste(list2, collapse = "\n"))

# Cronbach's kappa between two coders 

open <-read.csv("appendix_f_openended_irr.csv")

kappa2(open[c("reason.x", "reason.y")], "unweighted")
